package com.fr.report.cellElement;

import com.fr.util.Utils;
import java.text.FieldPosition;
import java.text.Format;
import java.text.ParsePosition;

public class TextFormat extends Format
{
  private static TextFormat format = new TextFormat();

  public static TextFormat getInstance()
  {
    return format;
  }

  public StringBuffer format(Object paramObject, StringBuffer paramStringBuffer, FieldPosition paramFieldPosition)
  {
    if (paramObject == null)
      return new StringBuffer(null);
    return new StringBuffer(Utils.objectToString(paramObject));
  }

  public Object parseObject(String paramString, ParsePosition paramParsePosition)
  {
    return paramString;
  }

  public boolean equals(Object paramObject)
  {
    return (paramObject == format);
  }

  private Object readResolve()
  {
    return format;
  }
}